package com.yuanfeng.job.job;



import com.yuanfeng.job.service.JobMoneyStaticsService;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author lxt
 *查询每月激活未充值的总金额
 */
public class PdbMoneyStatisticsJob implements BaseJob {

    private static final Logger logger = LoggerFactory.getLogger(SalesPromotionsJob.class);
@Autowired
private JobMoneyStaticsService jobMoneyStaticsService;

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		// TODO Auto-generated method stub
		SimpleDateFormat dateformat=new SimpleDateFormat("yyyy-MM");
		String finishTime = dateformat.format(new Date());
		 logger.info("本次插入统计金额，开始时间:"+finishTime);

		jobMoneyStaticsService.InsertMoneyStatistport(finishTime);
	}

}
